package dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import entity.Essay;

public interface EssayDao {
	/**
	 * 分页查询
	 * @return
	 */
	List<Essay> getList(@Param("num")int num,@Param("start")int start,@Param("count")int count);
	
	List<Essay> getAll();
	
	void add(Essay essay);
	
	List<Essay> getOpenEssays();

	Essay getById(int id);

	void updateEssayById(@Param("id")int id,@Param("state")boolean stat);

	void deleteById(int id);

	void updateContentById(@Param("id")int id,@Param("title") String title, @Param("content")String content);

	Integer findPreId(int id);

	Integer findNextId(int id);
}
